package com.ruicar.afs.cloud.common.modules.dto.mq.loan.contractdto;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import com.ruicar.afs.cloud.common.modules.afscorebusiness.enums.CustRoleEnum;
import com.ruicar.afs.cloud.common.modules.afscorebusiness.enums.CustTypeEnum;
import com.ruicar.afs.cloud.common.modules.afscorebusiness.enums.WhetherEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @param
 * @author yk.Li
 * @description 合同客户基本信息
 * @date 2020/7/8
 */
@Data
public class ContractCustBaseInfoDTO {
    /**
     * 客户id
     */
    @JSONField(name = "custNo")
    private Long id;
    /**
     * 合同号码
     */
    @JSONField(name = "contractNo")
    private String contractNo;
    /**
     * 客户类型 枚举值：个人、企业
     */
    @JSONField(name = "custType", serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    private CustTypeEnum custType;
    /**
     * 名称
     */
    @JSONField(name = "custName")
    private String custName;
    /**
     * 证件类型
     */
    @JSONField(name = "certType")
    private String certType;
    /**
     * 证件号码
     */
    @JSONField(name = "certNo")
    private String certNo;
    /**
     * 证件有效期起
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(name = "certStartDate")
    private Date certStartDate;
    /**
     * 证件有效期止
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(name = "certEndDate")
    private Date certEndDate;
    /**
     * 是否长期
     */
    @JSONField(name = "isLongTerm", serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    private WhetherEnum isLongTerm;
    /**
     * 案件角色 01-主借人、02-共借人、03-担保人
     */
    @JSONField(name = "custRole", serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    private CustRoleEnum custRole;
    /**
     * 手机号码
     */
    @JSONField(name = "phone")
    private String telPhone;
}
